# dynamic_plugin_loading.py

import importlib

def load_plugin(plugin_name):
    try:
        plugin_module = importlib.import_module(plugin_name)
        return plugin_module
    except ImportError:
        print(f"错误：无法导入插件模块'{plugin_name}'")
        return None

# 测试
plugin = load_plugin("plugin_module")
if plugin:
    plugin.do_something()